main function introduced