solved problem 6
implemented tests for solved problems