find bug of problem 3