Updated code to improve query coll accuracy