first implementation of hook
cleaning
manually merged hooks implementation