models implemented with relationships