Making the condition for adding to selection configurable