implements an ugly Observer pattern