using unified split function and joining