Casallas changes

Updated script by the savvy Juan Sebastián Casallas
(https://github.com/casallas)