Change create table logic