added associations and indexes