preparing for spi