diff --git a/protocol/blockchain/proof-of-work/difficulty-adjustment-algorithm.md b/protocol/blockchain/proof-of-work/difficulty-adjustment-algorithm.md
index d7c7a2f..173a23b 100644
--- a/protocol/blockchain/proof-of-work/difficulty-adjustment-algorithm.md
+++ b/protocol/blockchain/proof-of-work/difficulty-adjustment-algorithm.md
@@ -1,3 +1,4 @@
+
# Difficulty Adjustment Algorithm
In order to correct for changes in the Bitcoin Cash network's total hashing power (i.e. as hardware improves or nodes are added to or removed from the network), the amount of work required to mine a block must change in tandem.
@@ -7,19 +8,25 @@ The current Bitcoin Cash difficulty adjustment algorithm attempts to ensure that
Put into place as a part of [HF-20171113](/protocol/forks/hf-20171113), it performs the following calculation to determine the difficulty of a block, Bn+1, with block height `n+1`:
- Select Bnew: The block with the median timestamp of the blocks Bn, Bn-1, and Bn-2
- - Select Bold: The block with the median timestamp of the blocks Bn-144, Bn-145, and Bn-146
+ - Select Bold: The block with the median timestamp of the blocks Bn-144, Bn-145, and Bn-146.
- Calculate `t`, the difference between the timestamps of Bnew and Bold. If this difference is less than `72 * 600`, use `72 * 600`, if it is above `288 * 600`, use `288 * 600`.
- - Calculate `W`, the difference between the [chainwork](/protocol/blockchain/proof-of-work#chainwork) of Bnew and Bold.
- - Calculate `PW`, the projected work for the next block, as `(W * 600) / t`
+ - Calculate `W`, the difference in [chainwork](/protocol/blockchain/proof-of-work#chainwork) between Bnew and Bold.
+ - Calculate `PW`, the projected work for the next block, as `(W * 600) / t`.
- Calculate `T`, the target difficulty, as (2256 - PW) / PW. In 256-bit two's-complement arithmetic, this is equivalent to `(-PW) / PW`.
- - Finally, ensure that this target is less than the minimum difficulty of `0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`. If it is not, use the minimum difficulty instead.
+ - If `T` is greater than the maximum target of `0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`, use the maximum target. Otherwise, use `T`.
## Legacy Difficulty Adjustment Algorithm
Prior to [BCH-UAHF](/protocol/forks/bch-uahf), the original Bitcoin difficulty adjustment algorithm was used.
-This algorithm operated as follows:
+To determine the difficulty of a block, Bn+1, with block height `n+1`:
- - ...
+ - If the `n` (or the current block height) is **not** divisible by 2016, use the target of the last block, Bn. Otherwise, continue.
+ - Get the 2015th ancestor of the last block, Bn-2015 (this was originally intended to be the 2016th ancestor but due to a bug in the original implementation, the 2015th was used instead).
+ - Get the last block, Bn.
+ - Calculate `t`, the difference between the timestamp of Bn and Bn-2015.
+ - Calculate `c`, the correction factor by dividing `t` by the number of seconds in two weeks (`2 * 7 * 24 * 60 * 60 = 1,209,600`). Note this is the expected time for 2016 blocks at a rate of one block every ten minutes (`2016 * 10 * 60 = 1,209,600`). If the result is less than `0.25`, use `0.25`. If it is greater than `4`, use `4`.
+ - Calculate the new target, `T`, by multiplying the target of Bn by `c`.
+ - If `T` is greater than the maximum target of `0x00000000FFFF0000000000000000000000000000000000000000000000000000`, use the maximum target instead. Otherwise, use `T`.
## Emergency Difficulty Adjustment Algorithm