fixed bugs in create table function
tries to test db class by adding a table.