moved frmtp and frmt into one file