refactoring tweets controller