The effects of opportunities on insurgencies