Created a separate method to retrieve the numeric value of the spin button