refactoring CommandsHelper