Trains path generator working