substr to splice