added time warp code