changed the way the tweet function was working