updated ur logic for free text queries