Modified assignment 4