add a clean up function in the symbols.cpp