refactoring to client command class