custom trajectory hadnler