main function structure