implemented SPI interface