Task #8 solution