replaced isdefined with structkeyexists, Nitai said its 100x faster.....