public refactored