added simple reference solution and tests
changed output to ms