Add notify callback
Refactoring