Text this: Optimal contracts for teams