Added chooseFeature. Note that the helper fuction is not implemented.
There is a very bad early version partially implemented and commented out,
and I will be fixing that soon.