complying with legal requirements