add functions to notify listeners of events
invoke events for different commands