interval functions
document a new helper function
-