db related code changes