Fixed caclulation algo