support list of intervals, fixes #1