refactor twitter adapter