refactored things