implemented all selection events