modified for npm