refactoring Twitter