modified main to perform tests