tweak and debug sample_rows method