Added validation for paragraph count