Let's re-factor this a bit using an array and hash that can be iterated over.