improved tests for hook