tried main function