code cleaning: simulation mismatch