move ft-specific stuff to separate files