Revert "cleanup of hooks"

This reverts commit a36f32dbe528c7b812b4767af220e66050341ef8.
remove obsolete function