Updated number function