queries the database now