addHook - support object