added extensions api, and base class