Making changes for trajecotry, main is screwed up and the file is inclomplete