add master

main function