Corrected solution