minor rearranging of fd passing functions