Add selection detection