fix to calculate