made npm engine more flexible