added convertStringToIntArray function.