added main function
added real main function