removed obsolete code, memory leak found