fixed up the table method