modified Assignment 2