First solution for #1