Conditional Cooperation and the Effect of Punishment