added a generic hook - related to #15