refactorizing plc, move demo to  unitest/plc