added the atoi function