The effects of chlorine and selenium in cadmium telluride solar cells