I also forgot to add the pin close logic for the LED close function, updated in this version