fixing warnings in calculating and basic