refactored npm update to its own class