Add solution to mode challenge