refactored more into module methods