legal ops function