added the selectionop parameter. if no value is provided greedy selection is used.