modifications + added functionality to TrajectoryInVolume algorithm --David Caratelli