test_main created

fixing memory leak  ...