fixed find method, refactored cli