refactoring powerline