Kjeldahl and distillation method optimization