fixed removeUnnecessaryCalc