code for the notifcation and range report