refactoring for get/set order