adding duplicate origin check and origin and termination references to population