edited for compatibility with oe v7