added calc interval length