added number function with for loop inside.