square filling working for sample region