add main function with created option