working on search code