Better explanation, also includes the math