updated some calculations