refactor table model. get selected data row properly.