nml-add refactoring