finished implementing almost all functions and constructor of tableview. now only run remains!