replace array copying with Arrays.copyOfRange