correct code errors