switch to spinlocks for performance