refactor checkbox and click selection