moved the added of the tweets into a function