removed final from onCommand for flexibility