implemented stringtoInteger