fixed some calculations and values