use spinlock