updated code for twitter gem