update ThreeSum and add UPCPrinter