added main function, establishing program flow