updated LEDs indicator logic with dedicated loop and boolean logic