moved hook implementations into .module file