done method calculate