main function
added main, working