hook functions and your callback gets called when the function is executed