observer and module pattern