added directory support to create_table