added index.js; modified tests accordingly