wrote structs and query by name functions for dfs