implementing the find method