fix for calculating