database script set up and working