Selection class

updated version