making dict tree