added associations and tests