add index and export for npm