update selectionChange so it can be called independently