Refactor implementation as external provider has made some modification