Added number function and changed global variables around to match number function.