improved mocking