clean up, get_rows function