moved t2flow write methods out of controllers