updating calculations and graphing