moved computeArea to helper class