database set up and working