added simple split code. need to solve a bug