generate feature vector