fixed documentation and updated for npm