started scala solution for problem 56