fixed the print bug and succeed in the test