added ability for the mocker to be a function (for dynamic data)