added logic for mouse selected cells in setup method