implemented some new hook and API's for plugins