my atoi implementation