modified connecting m-file

modified connecting m-file;
added new trajector m-file (not tested)