implement problem 17: split