tweak the populate_results function