change name of query function to better understand it