restructured code to three seperate function and one execution function, added formula and prefix tuples
add in computeRatio function temporary