handle edge case where results.length is 0