move main function