improve row selection