added state switch-case to notification example