Adding solution to #8