Added max length to splitting