Created named function to return the result of the calculation