alternator causing bad idle??

checked the wiring and found the nut for the main feed wire has come off and the wire was just sitting on the stud. put a nut on it and fixed. must of been that way a while the wire end had cut the stud almost in 2.