make compatible with upstream UFL; need to optimize