add spinlock