changes to logic for mocks