moved limit checking into the trajectory