Unlocking community based flexibility to transform the energy system