niagra pwner small refactor