Made changes to previous version of assignment 4