added main function