Added calcArea function