refactoring: commands move into functions
fix installed state check in find command