changed notification type and added validation