Simplified Go solution for #6