values parameter has been added to query function