updated search.erl