collect input and calculate area