Has to be run with train lenght min and max