added tests in main()