method added to create table based on response structure