Pakistan's tribal region: From militancy to elections