modified assignment_4