merge slice() & copy() into single method