refactored selection API #24