added test for main for exit