refactoring twitter call