complete through assignment 2