generalize to tiles of all sizes