new trial at factorizing code for trajectory proposal in migrep