implemented indices of squares in same cell method