little refactor
part of npm modules index