core: added hook and replace