Corrected exercise and added solution