minor updates to SPIN code