Adding trajectory checking.