Task #5 solution