Re-write for clarity, using major contributions from