portability
Now change only PIC_NUM and MAX_PIC_NUM initialisation