modifying pregel