new example with locking