SPI library modified by A.Eissa