added 'done()' to end of database query in backend