Chanegd ts and lookahead time