updating slope calc