added legend to figures