added cluter function, added dim reduction function