stubbing in hooks