implemented the find method