Shared goals and cooperation