added power function and a atoi function