added number function with for loop