modify cmd splice function.