Skip to content

Biokinetic Models Configuration ​

Master the configuration and calibration of ASM1, ASM2d, and ASM3 biokinetic models for accurate activated sludge simulation.

Overview ​

Biokinetic models mathematically describe biological processes in activated sludge systems. ErgoPlanner supports three industry-standard Activated Sludge Models (ASM), each with different capabilities and complexity levels.

In this tutorial you'll learn:

  • When to use ASM1, ASM2d, or ASM3
  • How to configure each model properly
  • Parameter calibration techniques
  • Sensitivity analysis for key parameters
  • Model validation against plant data
  • Troubleshooting convergence issues

Estimated Time: 60 minutes

Difficulty: Advanced

Prerequisites ​

  • Completed Running-Simulations
  • Understanding of First-Simulation
  • Knowledge of activated sludge process fundamentals
  • Familiarity with biological treatment kinetics
  • Plant data for calibration (optional but recommended)

Step 1: Understanding Biokinetic Models ​

1.1 Model Comparison ​

FeatureASM1ASM2dASM3
Year198719991999
ComplexitySimpleHighMedium
COD Fractions71213
Processes82112
Parameters194423
Nitrification✓✓✓
Denitrification✓✓✓
Bio-P Removal✗✓✗
Storage Products✗✓ (PHA, PP)✓ (STO)
Typical UseConventional ASEBPR plantsResearch, MBR

1.2 Model Selection Criteria ​

Use ASM1 when:

  • Conventional activated sludge (no EBPR)
  • Carbon and nitrogen removal only
  • Limited calibration data available
  • Faster simulation is priority
  • Municipal wastewater treatment
  • Design/feasibility studies

Use ASM2d when:

  • Enhanced biological phosphorus removal (EBPR)
  • Complete nutrient removal (C, N, P)
  • Detailed phosphorus tracking required
  • A2O, UCT, Johannesburg configurations
  • Detailed plant data available for calibration
  • Regulatory P limits are stringent

Use ASM3 when:

  • Research applications
  • Membrane bioreactors (MBR)
  • High-rate systems
  • Storage polymer dynamics are important
  • Feast-famine conditions
  • Advanced model validation studies

Recommendation: Start with ASM1 for most applications. Only use ASM2d if phosphorus removal is critical, and ASM3 for specialized research applications.

1.3 Model Processes Overview ​

ASM1 Core Processes:

  1. Aerobic growth of heterotrophs
  2. Anoxic growth of heterotrophs (denitrification)
  3. Aerobic growth of autotrophs (nitrification)
  4. Decay of heterotrophs
  5. Decay of autotrophs
  6. Ammonification
  7. Hydrolysis of organic nitrogen
  8. Hydrolysis of organic substrate

ASM2d Additional Processes:

  • All ASM1 processes plus:
  • PAO (phosphorus accumulating organisms) growth
  • Anaerobic storage of PHA
  • Aerobic/anoxic storage of poly-phosphate
  • PAO decay and lysis
  • Precipitation of phosphorus
  • Fermentation processes

ASM3 Key Differences:

  • Storage polymer (STO) formation and degradation
  • No distinction between readily/slowly biodegradable COD
  • Different growth kinetics formulation

Step 2: Configure ASM1 ​

2.1 Select ASM1 for Reactor ​

  1. Click on your Aeration Tank or Bioreactor
  2. In properties panel, find "Biokinetic Model"
  3. Select "ASM1" from dropdown
  4. Panel expands to show ASM1-specific parameters

Screenshot placeholder: Aeration tank properties panel with Biokinetic Model dropdown showing "ASM1" selected. Below, expandable sections for Parameters, Stoichiometry, and Initial Conditions.

2.2 ASM1 Parameter Categories ​

ASM1 parameters are organized in groups:

Heterotrophic Parameters (6):

  • μ_H: Maximum growth rate
  • K_S: Half-saturation for substrate
  • K_OH: Oxygen half-saturation
  • K_NO: Nitrate half-saturation
  • b_H: Decay rate
  • η_g: Anoxic growth factor

Autotrophic Parameters (5):

  • μ_A: Maximum growth rate
  • K_NH: Ammonia half-saturation
  • K_OA: Oxygen half-saturation
  • b_A: Decay rate

Stoichiometric Parameters (8):

  • Y_H: Heterotrophic yield
  • Y_A: Autotrophic yield
  • f_P: Particulate fraction from decay
  • i_XB: Nitrogen content of biomass
  • i_XP: Nitrogen content of products
  • etc.

2.3 Default ASM1 Parameters (20°C) ​

ErgoPlanner provides literature default values:

ParameterSymbolDefaultUnitTypical Range
Max growth rate (het)μ_H6.0d⁻¹4.0-8.0
Max growth rate (aut)μ_A0.8d⁻¹0.5-1.0
Half-sat substrateK_S20g COD/m³10-30
Half-sat ammoniaK_NH1.0g N/m³0.5-2.0
Half-sat oxygen (het)K_OH0.2g O₂/m³0.1-0.5
Half-sat oxygen (aut)K_OA0.4g O₂/m³0.3-1.0
Decay rate (het)b_H0.62d⁻¹0.2-0.8
Decay rate (aut)b_A0.17d⁻¹0.05-0.2
Yield (het)Y_H0.67g COD/g COD0.6-0.7
Yield (aut)Y_A0.24g COD/g N0.20-0.28
Anoxic factorη_g0.8-0.6-0.9
Hydrolysis ratek_h3.0d⁻¹2.0-4.0

Tip: Start with these defaults. Only calibrate if you have plant data showing significantly different performance.

Screenshot placeholder: ASM1 parameters table showing all parameters with default values, units, and editable input fields.

2.4 Temperature Correction ​

ASM1 parameters are temperature-dependent:

parameter(T) = parameter(20°C) × θ^(T-20)

Default temperature coefficients (θ):

ParameterθEffect
μ_H1.07Growth increases 7%/°C
μ_A1.123Nitrification very temperature sensitive
b_H1.04Decay increases with temperature
b_A1.04
k_h1.116Hydrolysis faster at high T

ErgoPlanner applies temperature correction automatically based on reactor temperature.

Example: At 15°C (cold winter):

  • μ_H = 6.0 × 1.07^(15-20) = 4.22 d⁻¹ (30% slower growth)
  • μ_A = 0.8 × 1.123^(15-20) = 0.47 d⁻¹ (41% slower nitrification)

This explains why winter nitrification is challenging!

Tip: For seasonal analysis, run simulations at different temperatures (winter: 10-15°C, summer: 20-25°C) to identify worst-case conditions.

2.5 Configure Influent Fractionation ​

ASM1 requires influent COD to be fractionated:

COD Fractions:

  • S_I: Soluble inert (10-15% of total COD)
  • S_S: Readily biodegradable (20-30%)
  • X_I: Particulate inert (8-12%)
  • X_S: Slowly biodegradable (40-50%)

Total: S_I + S_S + X_I + X_S = Total COD

  1. Click on Influent stream
  2. Navigate to "ASM1 Fractionation" tab
  3. Choose fractionation method:

Option 1: Default Ratios

  • Uses typical municipal wastewater fractions
  • Quick setup, no testing required

Option 2: Manual Entry

  • Enter fractions from lab testing
  • More accurate, requires data

Option 3: From COD/BOD Ratio

  • ErgoPlanner estimates fractions from COD/BOD
  • Reasonable approximation

Screenshot placeholder: Influent fractionation panel showing pie chart of COD fractions (SS: 25%, XS: 50%, SI: 12%, XI: 13%) with input method radio buttons.

Typical Municipal Wastewater:

Total COD: 500 mg/L
├─ S_I: 60 mg/L (12%)
├─ S_S: 125 mg/L (25%)
├─ X_I: 65 mg/L (13%)
└─ X_S: 250 mg/L (50%)

Total TKN: 40 mg/L
├─ S_NH: 25 mg/L (ammonia)
├─ S_ND: 8 mg/L (sol organic N)
└─ X_ND: 7 mg/L (part organic N)

2.6 Set Initial Conditions ​

For steady-state:

  • Use default initial guesses
  • Solver will iterate to solution

For dynamic simulation:

  1. Run steady-state first
  2. Use steady-state results as initial conditions
  3. Or manually set typical values:
ComponentInitialUnit
S_O2.0mg/L
S_S2.0mg COD/L
S_NH1.0mg N/L
S_NO0.0mg N/L
X_H1,800mg COD/L
X_A80mg COD/L
X_S100mg COD/L

Screenshot placeholder: Initial conditions table for ASM1 with all state variables and default values filled in.

Step 3: Configure ASM2d ​

3.1 When to Use ASM2d ​

ASM2d is necessary when:

  • Biological phosphorus removal is required
  • Plant has anaerobic/anoxic/aerobic zones (A2O, UCT, etc.)
  • Effluent P limits are strict (< 1 mg/L)
  • Need to understand PAO/GAO competition
  • Evaluating EBPR optimization strategies

Warning: ASM2d is significantly more complex. Only use if phosphorus modeling is essential.

3.2 Select ASM2d ​

  1. Click on Bioreactor (anaerobic, anoxic, or aerobic zone)
  2. Biokinetic Model → "ASM2d"
  3. ASM2d parameter panel appears

Screenshot placeholder: Biokinetic model dropdown with ASM2d selected. Warning message: "ASM2d requires additional parameters and longer simulation time. Ensure you have calibration data."

3.3 ASM2d Parameter Groups ​

Ordinary Heterotrophs (OHO) - similar to ASM1:

  • μ_H: Maximum growth rate
  • K_S: Half-saturation for fermentation products
  • b_H: Lysis rate

PAO (Phosphorus Accumulating Organisms):

  • μ_PAO: Maximum growth rate
  • K_PS: Half-saturation for phosphate
  • K_PHA: Half-saturation for PHA
  • b_PAO: Lysis rate
  • Y_PO4: P requirement
  • Y_PHA: PHA yield

Autotrophs (nitrifiers) - same as ASM1

Additional processes:

  • Fermentation of readily biodegradable COD
  • Storage of PHA (polyhydroxyalkanoates)
  • Storage of poly-phosphate
  • Precipitation of phosphorus with metal salts

3.4 Default ASM2d Parameters (20°C) ​

Key PAO-specific parameters:

ParameterSymbolDefaultUnit
Max PAO growthμ_PAO1.0d⁻¹
PAO lysisb_PAO0.2d⁻¹
PAO P contentf_P_PAO0.38g P/g COD
PHA storage rateq_PHA3.0d⁻¹
PP storage rateq_PP1.5d⁻¹
Fermentation rateq_fe3.0d⁻¹
Half-sat phosphateK_PS0.2g P/m³

Tip: These parameters are highly system-specific. Calibration is essential for accurate EBPR modeling.

Screenshot placeholder: ASM2d parameters organized in expandable groups: OHO Parameters, PAO Parameters, Autotroph Parameters, Stoichiometry. PAO group expanded showing parameters above.

3.5 Configure A2O Process ​

For Anaerobic-Anoxic-Aerobic (A2O) configuration:

Anaerobic Zone:

  1. Create reactor: "Anaerobic Tank"
  2. Volume: ~20% of total
  3. Biokinetic Model: ASM2d
  4. Dissolved Oxygen: 0.0 mg/L
  5. Nitrate: 0.0 mg/L (critical!)

Anoxic Zone:

  1. Create reactor: "Anoxic Tank"
  2. Volume: ~30% of total
  3. Biokinetic Model: ASM2d
  4. Dissolved Oxygen: 0.0 mg/L
  5. Nitrate: present (from RAS)

Aerobic Zone:

  1. Create reactor: "Aerobic Tank"
  2. Volume: ~50% of total
  3. Biokinetic Model: ASM2d
  4. Dissolved Oxygen: 2.0 mg/L

Critical: Ensure NO nitrate in anaerobic zone! Even 0.1 mg/L NO₃-N will inhibit EBPR. Use external recycle, not RAS, to anaerobic zone.

Screenshot placeholder: Process diagram showing A2O layout: Influent → Anaerobic (20%) → Anoxic (30%) → Aerobic (50%) → Clarifier. External recycle from aerobic to anaerobic. RAS to anoxic.

3.6 ASM2d Influent Fractionation ​

ASM2d requires more detailed fractionation:

COD Fractions (similar to ASM1):

  • S_F: Fermentable substrate
  • S_A: Fermentation products (VFA)
  • S_I: Soluble inert
  • X_S: Slowly biodegradable
  • X_I: Particulate inert

Phosphorus Fractions:

  • S_PO4: Orthophosphate
  • S_P: Soluble organic P
  • X_P: Particulate organic P

Typical municipal wastewater:

Total P: 8 mg/L
├─ S_PO4: 5 mg/L (orthophosphate)
├─ S_P: 1 mg/L (soluble organic)
└─ X_P: 2 mg/L (particulate organic)

Screenshot placeholder: ASM2d influent fractionation showing COD pie chart and P fractionation bar chart side by side.

Step 4: Configure ASM3 ​

4.1 ASM3 Unique Features ​

ASM3 differs from ASM1/ASM2d:

Key Differences:

  • Storage products (STO) explicitly modeled
  • No distinction between readily/slowly biodegradable COD
  • Growth only on storage products, not substrate directly
  • Different yield formulation

Advantages:

  • Better represents feast-famine dynamics
  • More accurate for MBR and high-rate systems
  • Improved predictions under dynamic conditions

Disadvantages:

  • More parameters to calibrate
  • Less industry experience/data
  • Longer simulation times

4.2 Select ASM3 ​

  1. Click on Bioreactor
  2. Biokinetic Model → "ASM3"
  3. ASM3 parameter panel appears

Note: ASM3 is primarily for research or specialized applications. Most engineering work uses ASM1 or ASM2d.

4.3 ASM3 Key Parameters ​

ParameterSymbolDefaultUnitDescription
Storage ratek_STO5.0d⁻¹Substrate uptake to storage
Max growth rateμ_H2.0d⁻¹Growth on storage
Half-sat storageK_STO1.0g COD/m³Half-saturation
Endogenous respb_H0.2d⁻¹Maintenance energy
Storage yieldY_STO0.85g/gConversion efficiency
Growth yieldY_H0.63g/gBiomass yield

Screenshot placeholder: ASM3 parameters panel showing storage-specific parameters with detailed descriptions.

Step 5: Parameter Calibration ​

5.1 Why Calibrate? ​

Default parameters are literature values for "typical" systems. Real plants vary due to:

  • Wastewater characteristics
  • Operating conditions
  • Climate
  • Industrial contributions
  • Plant configuration

Calibration improves accuracy from ~30% error to ~5-10%.

5.2 Data Requirements ​

Minimum data (for basic calibration):

  • Influent flow (7-14 days average)
  • Influent COD, BOD, TKN, TP (composite samples)
  • Effluent NH₄-N, NO₃-N, TN, TP (grab or composite)
  • MLSS, MLVSS in reactor
  • SRT (calculated from WAS flow)
  • Temperature

Better calibration:

  • 2-4 weeks of daily data
  • Multiple grab samples per day
  • Nitrite measurements
  • Alkalinity
  • Dissolved oxygen profiles

Optimal calibration:

  • 3-6 months seasonal data
  • Online sensor data (DO, NH₄, NO₃)
  • Batch tests (OUR, NUR, AUR)
  • Respirometry results
  • Isothermal titration calorimetry

5.3 Calibration Workflow ​

Step 1: Mass Balance

  1. Verify input data quality
  2. Check mass balances (COD, N, P)
  3. Reconcile discrepancies
  4. Calculate average conditions

Step 2: Stoichiometry

  1. Calibrate yield coefficients (Y_H, Y_A)
  2. Adjust based on observed sludge production
  3. Verify oxygen demand calculations

Step 3: Kinetics

  1. Calibrate maximum growth rates (μ_H, μ_A)
  2. Adjust half-saturation constants (K_S, K_NH)
  3. Tune decay rates (b_H, b_A)

Step 4: Validation

  1. Run simulation with calibrated parameters
  2. Compare predictions to measurements
  3. Assess errors for each output
  4. Iterate if needed

Screenshot placeholder: Flowchart showing calibration workflow: Data → Mass Balance → Stoichiometry → Kinetics → Validation, with feedback loop from Validation to Kinetics.

5.4 Sensitivity Analysis ​

Identify which parameters matter most:

High Sensitivity (±20% change → ±15-25% output change):

  • μ_H (heterotrophic growth rate) → affects MLSS, DO
  • Y_H (heterotrophic yield) → affects sludge production, DO
  • b_H (heterotrophic decay) → affects MLSS, SRT
  • μ_A (autotrophic growth rate) → affects nitrification
  • Y_A (autotrophic yield) → affects oxygen demand

Medium Sensitivity (±20% → ±5-15% output):

  • K_S, K_NH (half-saturation) → affects kinetics at low conc
  • b_A (autotrophic decay) → affects nitrification
  • η_g (anoxic factor) → affects denitrification rate

Low Sensitivity (±20% → <±5% output):

  • K_OH, K_OA (oxygen half-sat) → usually not DO-limited
  • Hydrolysis parameters → long SRT systems
  • Inert fractions → affects MLSS slightly

Calibration Priority:

  1. Y_H (from sludge production data)
  2. μ_H (from DO uptake or MLSS)
  3. μ_A (from nitrification performance)
  4. b_H, b_A (from SRT and MLSS data)
  5. Others only if significant discrepancies remain

Tip: Don't calibrate all parameters! Focus on the 3-5 most sensitive ones.

5.5 ErgoPlanner Calibration Tool ​

ErgoPlanner includes built-in calibration:

  1. Navigate to Tools → "Parameter Calibration"
  2. Import plant data CSV:
csv
Date,Inf_Flow,Inf_COD,Inf_TKN,Eff_COD,Eff_NH4,Eff_NO3,MLSS
2025-01-01,10000,520,42,28,0.9,8.2,3520
2025-01-02,10200,505,41,32,1.1,7.8,3480
...
  1. Select parameters to calibrate:
    • ☑ Y_H
    • ☑ μ_H
    • ☑ μ_A
    • ☐ K_S (not sensitive)
  2. Click "Auto-Calibrate"

ErgoPlanner uses optimization algorithms to find best-fit parameters.

Output:

  • Calibrated parameter values
  • Statistical fit metrics (R², RMSE)
  • Comparison plots (predicted vs measured)
  • Confidence intervals

Screenshot placeholder: Calibration tool interface showing data import section, parameter selection checkboxes, and "Auto-Calibrate" button. Results panel shows R² = 0.92, calibrated parameters highlighted.

5.6 Manual Calibration Example ​

Observed Data:

  • Influent: 10,000 m³/d, 500 mg COD/L, 40 mg TKN/L
  • Effluent: 25 mg COD/L, 0.8 mg NH₄-N/L
  • MLSS: 3,200 mg/L (measured, expected 3,800 mg/L from model)
  • WAS: 150 m³/d at 10,000 mg/L (measured)

Problem: Model overpredicts MLSS by 19%

Analysis: MLSS is mainly determined by yield (Y_H) and decay (b_H).

Sludge production = Y_H × COD_removed - b_H × X_H × V × SRT

Lower MLSS → either lower Y_H or higher b_H

Approach 1: Reduce Y_H

  • Default: 0.67
  • Try: 0.60 (-10%)
  • Result: MLSS = 3,350 mg/L (still high by 4.5%)

Approach 2: Increase b_H

  • Default: 0.62 d⁻¹
  • Try: 0.72 d⁻¹ (+16%)
  • Result: MLSS = 3,180 mg/L (good match!)

Verification:

  • Check effluent quality still matches (✓)
  • Check oxygen demand reasonable (✓)
  • Validate with different data period (✓)

Calibrated: b_H = 0.72 d⁻¹ (vs default 0.62)

Tip: Document all calibration changes and justifications. Include in project notes.

Step 6: Model Validation ​

6.1 Validation Metrics ​

Assess model accuracy:

R² (Coefficient of Determination):

  • R² > 0.9: Excellent fit
  • R² = 0.7-0.9: Good fit
  • R² = 0.5-0.7: Moderate fit
  • R² < 0.5: Poor fit, recalibrate

RMSE (Root Mean Square Error): Lower is better. Compare to measurement variability.

MBE (Mean Bias Error):

  • Positive: Model overpredicts
  • Negative: Model underpredicts
  • Close to zero: Unbiased

Example Validation Results:

ParameterR²RMSEMBEAssessment
Eff COD0.883.2 mg/L+0.5 mg/LGood
Eff NH₄-N0.910.4 mg/L-0.1 mg/LExcellent
Eff NO₃-N0.751.8 mg/L+1.2 mg/LGood (slight overpredict)
MLSS0.83180 mg/L-50 mg/LGood

Screenshot placeholder: Validation results dashboard showing scatter plots of predicted vs measured for each parameter, with R², RMSE, MBE statistics.

6.2 Visual Validation ​

Compare time-series:

  1. Plot measured data points
  2. Overlay model predictions
  3. Look for:
    • Overall trend match
    • Variability captured
    • No systematic bias
    • Outliers explained

Screenshot placeholder: Time-series plot showing measured effluent NH4-N (blue dots) and model predictions (red line) over 30 days. Good overall agreement with some scatter.

6.3 Process-Level Validation ​

Beyond effluent, validate:

Oxygen Demand:

  • Compare predicted vs actual aeration energy
  • Should match within 10-20%

Sludge Production:

  • Compare predicted vs measured WAS solids
  • Should match within 15%

Nutrient Balances:

  • Verify nitrogen balance (IN = OUT + denitrified)
  • Verify phosphorus balance

Operating Parameters:

  • MLSS predictions vs measurements
  • F/M ratio consistency
  • SVI if clarifier modeling included

Step 7: Troubleshooting ​

7.1 Common Convergence Issues ​

SymptomLikely CauseSolution
Simulation fails immediatelyUnrealistic initial guessUse steady-state solver initialization
Oscillating concentrationsKinetics too fast, time step too largeReduce time step to 1-2 min
Negative concentrationsNumerical instabilitySwitch to Rosenbrock integrator
No nitrification predictedμ_A too low, DO too low, or temp too lowCheck parameters and operating conditions
Effluent COD too highInsufficient volume or SRTIncrease reactor volume or reduce WAS

7.2 Unrealistic Results ​

Symptom: Model predicts effluent NH₄-N = 15 mg/L, measured = 0.8 mg/L

Diagnosis:

  1. Check nitrifier population (X_A) in model - likely too low
  2. Check DO in model - must be > 1 mg/L for nitrification
  3. Check temperature - nitrification very temperature-sensitive
  4. Check SRT - must be > 8-10 days for nitrification

Solution:

  1. Verify DO controller is active (target 2.0 mg/L)
  2. Check temperature setting matches actual
  3. Increase μ_A if still not nitrifying
  4. Check for inhibitors in influent

Symptom: Model predicts MLSS = 12,000 mg/L, measured = 3,500 mg/L

Diagnosis: Massive overprediction suggests:

  1. Yield (Y_H) too high
  2. Decay (b_H) too low
  3. WAS flow too low in model
  4. Influent COD too high

Solution:

  1. Verify WAS flow matches actual plant
  2. Check influent COD value
  3. Reduce Y_H to 0.55-0.60
  4. Run mass balance check

7.3 Model Selection Issues ​

Problem: ASM1 predicts good P removal, but plant has none

Explanation: ASM1 doesn't model phosphorus removal mechanisms! It only tracks mass balance.

Solution: Use ASM2d for P removal modeling, or accept that ASM1 only gives mass balance, not actual removal.

Problem: ASM2d predicts no EBPR even though plant has A2O configuration

Possible Causes:

  1. Nitrate entering anaerobic zone (check recycle configuration)
  2. VFA too low in anaerobic zone (check fermentation parameters)
  3. PAO/GAO competition (GAO winning due to low P or high T)
  4. Insufficient anaerobic HRT

Solution: Review process configuration, check nitrate intrusion, verify VFA availability.

Summary ​

You've learned to:

  • ✓ Select appropriate biokinetic models (ASM1/ASM2d/ASM3)
  • ✓ Configure model parameters for each model type
  • ✓ Understand parameter sensitivity and importance
  • ✓ Perform parameter calibration using plant data
  • ✓ Validate model predictions against measurements
  • ✓ Set up complex configurations (A2O for EBPR)
  • ✓ Troubleshoot common modeling issues

Common Issues ​

IssueSolution
Which model to use?ASM1 for most, ASM2d only if P removal needed
Default parameters not workingCalibrate Y_H, μ_H, μ_A to plant data
Poor nitrification predictionCheck DO > 1.5 mg/L, SRT > 10 days, temperature
EBPR not working in ASM2dVerify NO₃ = 0 in anaerobic, check VFA
Simulation too slowUse ASM1 instead of ASM2d/3 if possible

Next Steps ​

Apply your knowledge:

Advanced topics:

  • Bioreactor - Detailed reactor modeling
  • Advanced-Solvers - Numerical methods for complex models
  • Design-Calculations - Use calibrated models for design

Last updated: December 2025Tutorial difficulty: AdvancedEstimated completion time: 60 minutes