Maximizing flexibility and cooperation