added twitter logic