need to fix managehooks