trying to make sense of teacher solution