update auto-tile to use gap variable