using global hash instead of reference and delayed death