Add solution to #6