refactored module architecture to use SPI