added searchlogic