resetTile function added