rewrote tests for spi