added splice and cut functions