database now working