top functionality,structure test cases and memory freed