New PIC code

Rewriting PIC code