handling last empty row