refactored find method