added atoi function