db: take static vs global into consideration wit function pointers