led main logic