adding pseudoSPI_test code

haven't tested it yet, though.