my version of atoi