Ticket #3004 cleanup
new addSelection function