using the event system in command - closes #19