added associations and constraints