finished management function