Task #6 solution