array copy works