added more comment to explain how spi work