update for npm compatibility