Completing Week2 homework assignment.