Changed intervals to have exclusive end point (fixes #26)