updated with working SPI