update and fix management function