Completed revised assignment 8