Add solution for #22
Add solution for #131