Solved the last exercise (kind of)!