Changed find logic to support dynamic search