Adding solution to #9