added some features, traded vectorization