made previousTimeIndex dynamic
solve merge conflicts