modularize textrank