Modification completed in Assignment 4- revised