made two test classes (not testcases) and fixed some bugs.