created functions to calculate area with math