added generic hook