started writing expand_table method