Each of these methods does the same thing, so this refactors into an attribute lookup, which saves writing boilerplate code and makes it easier to add new properties.