new test for hook creation, fix bugs found in testing