added support for AllTrials, improved docstrings