Updated behavior of intervals function

@sgray10 I added you to the CONTRIBUTORS and will release this new version