This pattern inside the {} repeats over and over.  Can we push it to a method/object, maybe?