Solution for #20.