solved problem 5
solved 6th problem