code used for Twitter API v1