properly split a string