Added option for defining trajectory manuually