added some internal functions to extension definitiion