added ddl and query