verified the correctness of print