added substruct_intervals_fast function (first interation) and unit tests for it (some may fail at this point)