calculate timeline interval stuff