Add solution for #6