adding db stuffs
adding db stuffs
fixing some issues