added selection view logic