code working and pcb ac detect updated