form2: added legend param