first pass for atoi
improve to use the java api