Completed revised assignment 7