Quantifying costs and benefits of flexibility for DSOs