A relatively inefficient solution