fixed bug in tomTests.c