refactored get_ids_and_row_mins
got rid of unused code and comments
tested get_ids_and_row_mins method