add to diagram functions