improving collection and fixing index.js for latest version of sequelize