#refactor into module