improved code for subscribe all