draft version of pregel, compile error to be fixed