working on distributed version