made a main function