starting main function