fixing simulation equation