refactored tweetHandler