better handling for tile/pattern