sc: add main function.