use mock to mock api calls