switched script for npm module