PIC code for Milestone 1