Updated decentralized version with errors though !