Add method to convert string to integer