Solution for #7