updated spim.c