adjusted for new mock func