working on insert intervals