implement create table method.