From metallic to semiconductor conversion of single –walled carbon nanotubes by chlorination