updated to reflect some of the suggestions from assignment 5 comments