rewrite atoi