implement resalt for the new db layer