modified mock.c