Added functioinality to selection