use nan
refactor package