some improved spinlock