added recursive dict check