improved table snippet