db setup and working