Wrote splat function