factorize more calls to fill_rectangle()