added ability to pass in series object or path