added associations and the corresponding tests for models