moved create table into constructor