Second version of Assignment 4