Refactored to use SPI style