rework to use selection changed event - issue #144