mocking with rewire and so have a cleaner code