rewrite command registration to allow multiple hooks on one command