added dim reduct functionality