use system.arraycopy for compatibility