table now has full functionallity