catching empty rows

added the catching rows