locks for access functions are now better placed