modified pregel