modify plot to process dirs