working out some bugs for sequelize js