Completed assignment 8 revised