fixed model.js and changed courses to be indexed by number