implemented for multiple trains