optimize splitWords
add append