Modified after viewing the course's solution, on going...