The deterrent effects of prison: evidence from a natural experiment