Notifications creation function improvement