added some constants and fixed some bugs in mock version