changed spinlock