extended selection API, deprecated setSelection as per #174