Rule following and cooperation