implemented NSCoding methods on model objects