fixing bug in feature_f