the code is unused tight now. If this is to be kept, it has anyway to be made functional and thread safe.