control flow for empty data sets