added a hook for commands