refactored all