corrected code errors