main fwt. cpp