add subscribe function to observing