solving 1_7
adding problem 1_8