fixed greatest.better as an input for select function