paul_sumo: improved code using averaging