refactored managed object function into stand-alone module