implement part of the main activity and Table class.