splitting and joining exercise