add main setting
add main function