added abs() method (absolute value) to trajectory