Struggling through assignment 2