ng API refactoring