added commands, refactoring