Updated get_results function.