added example for alternative way of adding hooks