Generalized formula and scaling script added