implemented legend on multiple pages - #28