updated with hw4 changes'