some code  corrections