worked on selection mode