Reduction of primary energy consumption through distributed thermal storage in buildings connected with a district heating network