implement twin and copySquareArray methods