first version
Merge pull request #11 from Valetudox/sum_of_intervals

first version