Completed assignment 7 revised