adding pre/post hooks for tests