Update index.js

Added some more functionality that simulates what I have.