refactoring clmanager working