corrected code errors #2