added resource model with join table