not really a fully compatible replacement. we should really have an example use of this somewhere here...