Modified assignment 7