assignment 2 fixes