refactored twitter controller