add the notification and change the logic