proper use of atoi