checking getSelection()