partial code for db feature storage, squash later