add test for hook