basic selection detection