put hook call in wrong place