finished part 1 derivation