using MutationObserver instead of regular DOM events