change registers from array to slice (no copying)