fixing bug with squaresFilled