Calculating volume of objects