inverse calculation, overall explanation and code commenting