Refactored a long expression into a method in PartBuilder