sort of did problem 1