Updates

Added a function to correct minor variations during simulation