add table delegate code
addTableView delegate code and segment inaction