refactored code and added SaveEventCommand and impl