added exception handling for twitter API