refactor ngClassify