modifications for assignment 7