add Observer Pattern - js