handle text splitting