Ok, I think I don't really need to use locals(). Change to dictionary is ok. Thanks cevich.