On the bifurcations creating horseshoes