added main function
edit main