rewrite of Yocto's ADT