issue #2 mock function