redoing this, npm is making me go bananas. Added test and index