re-added lost commits to otextension code from previous merge