added tests for main