This question is a possible solution ( untested by myself yet ) to the following question here
I read a blogpost here, which states the proper way of using hook
hook