This little chunk seems like a good candidate for a method.