renamed function
solved problem 6
solved problem 3