function message notification now working