twitter logic improved