add the dist lock code