fixed some test cases, should use assert instead of test