Implemented stringToNumber

Also changed a test case