database now works