error in code rectified