minor changes to problem 1 and removed other solutions I was playing around with