add fd-vars macro, convert tests to updated api