refactored getHookFor(req)
added executeCommandFor(req)