Changed while loop on train to work without j++
fixed merge conflict