add case for empty result set