Assignment 5.1 modifications