created design for a spinlock