Cooperation in Social Dilemmas: The Role of Punishment and Volunteering