term: use three arrays instead of square struct