What is the problem in this code?