corrected solution