Made some changes for giving negative time shifts