some simple refactor