finish calculation of gain ratio 0505