extracting selection listener