atoi and lower function