make cleanup and add some test