updates
moved db to application lvl