added some calculations