refactored to use BaseViewController and BaseTableViewController