simplified background query function