Split the string for multiple iterations to get around string length issue