Added new fields and modified search logic