assignment 7; almost complete