added functionality for trimmed data