adding package.json; adding useful functions to index.js;