Train functionality updated.