added working SPI code for project 3