updated test case and fixed some compiler errors