Ading code for locking pkgs