Implemented changes for Homework 4