refactor lnpm