Invoked both codes and calcArea twice.