legency