properly integrate the locking framework