changed legend loading to remove redundant map