refined select query; added priorities to request queue items