added tests to main.cpp