added support for observable pattern & refactored code