add function configuration in main.js