working through assignment 7