added observer and tests