refactor using and rename it to managed