to write the core module as an observer