number function not quite right
fixed it