mocking global functions