implemented SPI