functioning ftr_mains.c