refactor code ,update extension and configuration