added a random splice function