switch number to integer