add extension setup function
document setup function