Adding spin functionality