Add solution from mahimahi42