add an method to do the calculate