add solution for implementing atoi.