lab3 for cg3207 version one, has error