Solved problem 6
add solution code template