modified create_table method