Modified the models for relations