errors in solution fixed