or(".subtitle").innerHTML = ''

                    if (sortByDate) {
                        console.log("sorting by date")
                        finalTweets = finalTweets.sort((a, b) => new Date(a.tweet.created_at) - new Date(b.tweet.created_at))
                    }
                    console.log(finalTweets)
                    finalTweets.forEach(item => {
                        output += displayTweet(item.tweet, item.score, item.accountInfo, item.imageUrl)
                    })
                 