finish refactor into congext-manager class