make copy() faster, share code between copy() and slice()