a contraceptive is used to prevent pregnancy