calculating improvement ratio