It turns out to be 'cause I used 'list' as my variable name. I changed it to something else and now it works fine. Thanks to all! I should have be more careful about the variable names. I have been using "list" in some small scripting which worked flawlessly and it just pop up to my mind easily. -shuhsien