updated for assignment 7