wrong command name
also create a hook
Register hooks if it's missing
refactored a bit