refactor notify.