atoi tested on leetcode