calculate-the-diameter