main function startup