refactoring command map into enum