added getSelection(). Allows for cleaner code.