adding depth to children method
working on nesting