gracefully handle empty dataset