Added Spin code