Solution to the assignment

Solution to the assignment: works as requested.